#include "StdAfx.h"
#include "WorkCycle.h"

WorkCycle::WorkCycle()
: m_startTime(CTime::GetCurrentTime())
, m_bFinished(false)
{
}

WorkCycle::WorkCycle(const CTime& startTime)
: m_startTime(startTime)
, m_bFinished(false)
{			
}

void WorkCycle::EndCycle()
{
	EndCycle(CTime::GetCurrentTime());	
}

void WorkCycle::EndCycle(const CTime& endTime)
{
	ASSERT(m_startTime <= endTime);
	m_endTime = endTime;
	m_bFinished = true;
}

bool WorkCycle::IsFinished() const
{ 
	return m_bFinished;
}
